package csw;

public class J15Extends {

	public static void main(String[] args) {

	}

}

class J15SungJukV1{
	private String name;
	private int kor;
	private int eng;
	private int mat;
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getKor() {
		return kor;
	}
	public void setKor(int kor) {
		this.kor = kor;
	}
	public int getEng() {
		return eng;
	}
	public void setEng(int eng) {
		this.eng = eng;
	}
	public int getMat() {
		return mat;
	}
	public void setMat(int mat) {
		this.mat = mat;
	}
	
	
}
class J15SungJukV1b{
	private String name;
	private int kor;
	private int eng;
	private int mat;
	private int sci;
	private int art;

	public int getTot(){
		
		return kor +eng + mat;
	}


}//상속을 사용하지 않은 경우
class J15SungJukV2 extends J15SungJukV1b{
	private int sci;
	private int art;
	public int getSci() {
		return sci;
	}
	public void setSci(int sci) {
		this.sci = sci;
	}
	public int getArt() {
		return art;
	}
	public void setArt(int art) {
		this.art = art;
	}
	
	@Override
	public int getTot() {
		return super.getTot() +sci + art;
	}
	
}//상속을 사용하는 경우


class Search4Super
					extends Object{
	

}












